export default function request(obj) {
	let url = obj.url;
	let method = obj.method || 'GET'
	let data = obj.data;
	let header = {
		'Content-Type': obj.contentType || 'application/x-www-form-urlencoded'
	};
	return new Promise((resolve, reject) => {
		uni.request({
			url: url,
			data: data,
			header: header,
			method: method,
			success: (res) => {
				resolve(res.data)
			},
			fail: (err) => {
				reject(err)
			}
		})
	})
}
